#pragma once
#include<istream>
#include<vector>
#include<string>
using namespace std;

int mysqrt(int x) {
	if (x < 1)return 0;
	long long left = 1, right = x;
	while (left < right) {
		int mid = left + (right - left) / 2;
		if (mid * mid <= x)left = mid;
		else right = mid-1;
	}
	return left;
}
